<%--
    Document   : index
    Created on : Oct 11, 2011, 12:01:14 AM
    Author     : XuanTuan
--%>

<%@page import="sun.security.x509.CertificateSubjectName"%>
<%@page import="sun.security.x509.X500Name"%>
<%@page import="sun.security.x509.X509CertInfo"%>
<%@page import="java.io.FileInputStream"%>
<%@page import="org.apache.tomcat.jni.FileInfo"%>
<%@page import="model.CA_Service"%>
<%@page import="sun.security.x509.X509CertImpl"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>VeriSign Authentication Services - The leading Provider of SSL.
            Products include SSL, SSL Certificates, Extended Validation
            (EV SSL), VeriSign Trust Seal, Malware Scan & Code Signing.</title>
        <link href="styles.css" rel="stylesheet" type="text/css" media="screen" />
        <link rel="stylesheet" href="nivo-slider.css" type="text/css" media="screen" />
    </head>
    <body>
        <div id="content">
            <div class="header_text">
                <div id="logo" >
                    <img src="images/verisignLogo.gif"/>
                </div>
            </div>
            <div id="back">
                <!-- header begins -->
                <div id="header">
                    <%@ include file="header.jsp" %>
                </div>
                <!-- header ends -->
                <!-- content begins -->
                <div id="main">
                    <div id="right">
                        <h1>Update certificate</h1><br/>
                        <%
                                    String certPath = request.getParameter("certPath");
                                    String CN = (String) request.getParameter("CN");
                                    String OU = (String) request.getParameter("OU");
                                    String O = (String) request.getParameter("O");
                                    String L = (String) request.getParameter("L");
                                    String C = (String) request.getParameter("C");
                                    String errorUpdate = (String) request.getAttribute("errorUpdate");

                                    CN = (CN == null) ? "" : CN;
                                    OU = (OU == null) ? "" : OU;
                                    O = (O == null) ? "" : O;
                                    L = (L == null) ? "" : L;
                                    C = (C == null) ? "" : C;
                                    errorUpdate = (errorUpdate == null) ? "" : errorUpdate;
                        %>

                        <h2>Enter your new information</h2><br/>
                        <form action="UpdateCertControl" method="post">
                            <table>
                                <th colspan="2"><font color="red"><%=errorUpdate%></font></th>
                                <tr>
                                    <td>Common name: </td>
                                    <td><input type="text" name="CN" value="<%=CN%>"/></td>
                                </tr>
                                <tr>
                                    <td>Organizational unit: </td>
                                    <td><input type="text" name="OU" value="<%=OU%>"/></td>
                                </tr>
                                <tr>
                                    <td>Organization: </td>
                                    <td><input type="text" name="O" value="<%=O%>"/></td>
                                </tr>
                                <tr>
                                    <td>Locality: </td>
                                    <td><input type="text" name="L" value="<%=L%>"/></td>
                                </tr>
                                <tr>
                                    <td>Country: </td>
                                    <td><input type="text" name="C" value="<%=C%>"/></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td><input type="submit" value="Submit"/>
                                        <a href="./ManagerCert.jsp"><input type="button" value="Cancel"/></a>
                                        <input type="hidden" name="certPath" value="<%=certPath%>">
                                    </td>
                                </tr>
                            </table>
                        </form>
                    </div>

                    <div id="left">
                        <%@include file="leftPanel.jsp" %>
                    </div>


                    <!--content ends -->
                    <!--footer begins -->
                </div>


                <div id="footer">
                    <p>Copyright  2011.Design by Nguyen Xuan Tuan</p>
                </div>
                <div style="clear: both"></div>
            </div>

        </div>
        <!-- footer ends-->
    </body>
</html>
